<?php $form=$this->beginWidget('CActiveForm', array(
	'id'=>'comment-form',
	'enableAjaxValidation'=>true,
    'action'=>Yii::app()->createUrl('/comment/create'),
   	'clientOptions'=>array(
		'validateOnSubmit'=>true,
	),
)); ?>


	<?php //echo Yii::t('admin','<p class="note">Fields with <span class="required">*</span> are required.</p>');?>


	<?php if($controller == 'blog'):?>
	
		<?php //echo $form->labelEx($model,'com_aid'); ?>
		<?php echo $form->hiddenField($model,'com_aid',array('value'=>$id)); ?>
		<?php //echo $form->error($model,'com_aid'); ?>
	
	<?php endif;?>
    
    <?php if($controller == 'labs' && $action == 'view'): ?>
        <?php echo $form->hiddenField($model,'com_proid',array('value'=>$id)); ?>
    <?php endif;?>
    
    <?php if($controller == 'labs' && $action == 'sview'): ?>
        <?php echo $form->hiddenField($model,'com_solid',array('value'=>$id)); ?>
    <?php endif;?>

	<?php if($controller == 'audio'):?>
	
		<?php //echo $form->labelEx($model,'com_auid'); ?>
		<?php echo $form->hiddenField($model,'com_auid',array('value'=>$id)); ?>
		<?php //echo $form->error($model,'com_auid'); ?>
	
	<?php endif;?>
	<?php if($controller == 'gallery'):?>
	
		<?php //echo $form->labelEx($model,'com_gid'); ?>
		<?php echo $form->hiddenField($model,'com_gid',array('value'=>$id)); ?>
		<?php //echo $form->error($model,'com_gid'); ?>
	
	<?php endif;?>
	<?php if($controller == 'video'):?>
	
		<?php //echo $form->labelEx($model,'com_vid'); ?>
		<?php echo $form->hiddenField($model,'com_vid',array('value'=>$id)); ?>
		<?php //echo $form->error($model,'com_vid'); ?>
	
	<?php endif;?>
	<?php if($controller == 'file'):?>
	
		<?php // echo $form->labelEx($model,'com_fid'); ?>
		<?php echo $form->hiddenField($model,'com_fid',array('value'=>$id)); ?>
		<?php //echo $form->error($model,'com_fid'); ?>
	
	<?php endif;?>

	
		<?php //echo $form->labelEx($model,'com_status'); ?>
		<?php echo $form->hiddenField($model,'com_status',array('value'=>Comment::COMMENT_LOCK)); ?>
		<?php //echo $form->error($model,'com_status'); ?>
	

	
		<?php //echo $form->labelEx($model,'com_author'); ?>
		<?php echo $form->textField($model,'com_author',array('size'=>30,'maxlength'=>30,'title'=>'网名')); ?>
		<?php //echo $form->error($model,'com_author'); ?>
	

	
		<?php // echo $form->labelEx($model,'com_email'); ?>
		<?php echo $form->textField($model,'com_email',array('size'=>50,'maxlength'=>50,'title'=>'电子邮件')); ?>
		<?php //echo $form->error($model,'com_email'); ?>

	
		<?php //echo $form->labelEx($model,'com_website'); ?>
		<?php echo $form->textField($model,'com_website',array('size'=>50,'maxlength'=>50, 'title'=>'个人主页')); ?>
		<?php //echo $form->error($model,'com_website'); ?>

        
		<?php // echo $form->labelEx($model,'com_contents'); ?>
		<?php echo $form->textArea($model,'com_contents',array('rows'=>6, 'cols'=>50,'title'=>'内容……','style'=>'width:95%;margin-top:10px;padding:5px;line-height:1.5em;height:150px;')); ?>
		<?php //echo $form->error($model,'com_contents'); ?>
	
		<button type="submit" class="minimal">提交</button>
        <?php echo $form->errorSummary($model); ?>


<?php $this->endWidget(); ?>